﻿           
@{
    ViewBag.Title = "Thêm mới đối tác";
    Layout = "~/Views/Shared/_Layout.Management.cshtml";
}

<form method="post" class="form" action="/Management/PartnerList/Add">
	<fieldset id="firstStep">
			<h2 class="app">
	            <strong>Express - Thêm mới đối tác</strong>
            </h2>
		    <div class="errorMessage" data-bind="visible: InvalidateForm" >
			    <span class="error">Xin hãy nhập thông tin bên dưới chính xác.</span>
		    </div>					
			<div class="title">
				<h3>Về công ty</h3>
			</div>
			<div class="columns">
				<div class="col indent">
					<div class="row">
						<label for="text1">Tên công ty:</label>
						<input class="text" type="text" data-bind="value: CompanyName, attr:{maxlength:250}" name="CompanyName" />
					</div>
					<div class="row">
						<label for="text2">Tên người liên êệ:</label>
						<input class="text" type="text" data-bind="value: ContactTitle, attr:{maxlength:50}" name="ContactTitle" />
					</div>
					<div class="row">
						<label for="text4">Địa chỉ e-mail:</label>
						<input class="text" type="text" data-bind='value: EmailAddress, attr:{maxlength:100}' name="EmailAddress"/>
					</div>
				</div>
				<div class="col" style="width:450px">
                    <div class="row">
						<label for="text5">Logo:</label>
					</div>
                    <div class="groupinput">                    
                        <div class="row">
                            <img alt="logo" width="175" data-bind="attr: {src: ImageUrl}" />
                            <input type="hidden" name="ImageUrl" data-bind="value: ImageUrl" />
                        </div>
                        <div class="row">
						     <input type="file" name="fileData" id="fileData" class="btn btn-choose-file"  />
                             <div id="progress"></div>
					    </div>
                    </div>
				</div>
			</div>            
			<div class="title">
				<h3>Thông tin công ty</h3>
			</div>
			<div class="columns">
				<div class="col indent">
                    <div class="row">
						<label for="text7">Phone:</label>
						<input type="text" class="text" data-bind="value: Phone, attr:{maxlength:20}" name="Phone" />
					</div>
					<div class="row">
						<label for="text10">Fax:</label>
						<input class="text" type="text" data-bind="value: Fax, attr:{maxlength:20}" name="Fax"/>
					</div>
                    <div class="row">
						<label for="text11">Địa chỉ 1:</label>
						<input class="text" type="text" data-bind="value: Address1, attr:{maxlength:50}" name="Address1"/>
					</div>
                    <div class="row">
						<label for="text11">Địa chỉ 2:</label>
						<input class="text" type="text" data-bind="value: Address2, attr:{maxlength:50}" name="Address2"/>
					</div>
					<div class="row">
						<label for="text8">Thành phố:</label>
						<input class="text" type="text" data-bind="value: City, attr:{maxlength:50}" name="City"/>
					</div>
					<div class="row">
						<label for="select1">Tỉnh/thành:</label>
						<div class="select-holder">
							<select class="select1" data-bind='value: State, foreach: StateOptions, optionsCaption: "Select State"' name="State">
								<option data-bind="value: ID, text: Name">Select State</option>
							</select>
						</div>
					</div>
					<div class="row">
						<label for="text12">Mã:</label>
						<input class="text" type="text" data-bind="value: Zipcode, attr:{maxlength:10}" name="Zipcode"/>
					</div>
				</div>
				<div class="col extend">					
					<div class="row">
						<label for="text12">Website:</label>
						<input class="text" type="text" data-bind="value: WebsiteURL, attr:{maxlength:500}" name="WebsiteURL"/>
					</div>	
				    <div id="editform" class="row">
						<label for="text12">Kích hoạt:</label>
                        <div class="groupinput"><input class="text" type="checkbox" data-bind="checked: Active" name="Active" /></div>
					    
				    </div>
                    <div class="row">
						<label for="text12">Mô tả:</label>
                        <div class="groupextend" style="with:400px !important">                        
					        <textarea class="text" cols="40" rows="10" style="width:100%" data-bind="value: Description, attr:{maxlength:500}" name="Description">
                            </textarea>
                        </div>
                    </div>
				</div>
			</div>

		<div class="foot-info">
			<h3 class="centered-wbtn centered-wbtn-bottom save">
  				<span>
  					<a class="btn btn-cancel-page" href="/Management/PartnerList">previous</a>
					<input type="button" class="btn btn-submit-page" data-bind="click: SubmitForm" value="Submit" />
                </span>
			</h3>
		</div>
	</fieldset>
</form>
<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script src="/Scripts/ViewModel/addpartner.js" type="text/javascript"></script>
<script src="/Scripts/jquery.uploadify.js" type="text/javascript"></script>
<script src="/Scripts/apps.js" type="text/javascript"></script>